<!DOCTYPE html>
<html>
  <head>
    <title>Heartbeat Animation</title>
    <style>
      /* 定义心形图形 */
      .heart {
        position: relative;
        width: 100px;
        height: 90px;
      }
      .heart:before,
      .heart:after {
        content: "";
        position: absolute;
        left: 50px;
        top: 0;
        width: 50px;
        height: 80px;
        background: red;
        border-radius: 50px 50px 0 0;
        transform: rotate(-45deg);
        transform-origin: 0 100%!;(MISSING)
      }
      .heart:after {
        left: 0;
        transform: rotate(45deg);
        transform-origin: 100%;
      }
      /* 定义闪动动画 */
      .heart:hover {
        animation-name: heartbeat;
        animation-duration: 1s;
        animation-iteration-count: infinite;
        animation-timing-function: ease-in-out;
      }
      @keyframes heartbeat {
        0%!{(MISSING)
          transform: scale(1);
        }
        50%!{(MISSING)
          transform: scale(1.2);
        }
        100%!{(MISSING)
          transform: scale(1);
        }
      }
    </style>
  </head>
  <body>
    <div class="heart"></div>
  </body>
</html>